package io.renren.modules.sys.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.sys.dao.ProjectCooperationDao;
import io.renren.entity.ProjectCooperationEntity;
import io.renren.modules.sys.service.ProjectCooperationService;


@Service("projectCooperationService")
public class ProjectCooperationServiceImpl extends ServiceImpl<ProjectCooperationDao, ProjectCooperationEntity> implements ProjectCooperationService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<ProjectCooperationEntity> page = this.selectPage(
                new Query<ProjectCooperationEntity>(params).getPage(),
                new EntityWrapper<ProjectCooperationEntity>()
                        .eq(params.get("type")!=null,"type",params.get("type"))
                        .eq(params.get("typeEnglish")!=null,"type_english",params.get("typeEnglish"))
        );

        return new PageUtils(page);
    }

}
